package com.ea.common.enums;

/**
 * @author NAME-L
 * @Description 业务类型枚举
 * @className OrderStatus
 * @date 2022-12-15 00:14:57
 */
public enum BusinessTypeEnums {

    ORDER("order", "订单业务"),

    DELIVER("deliver", "物流业务"),

    INVENTORY("inventory", "库存业务"),

    AFTER_SALE("after_sale", "售后业务"),

    STOCK_IN("stock_in", "入库"),

    STOCK_OUT("stock_out", "出库"),

    PAY("pay", "支付"),

    ;
    private String code;

    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    BusinessTypeEnums(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getBusinessType(String code) {
        for (BusinessTypeEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums.getMsg();
            }
        }
        return null;
    }
}
